# -*- coding: utf-8 -*-
# @Time : 2023/4/3 21:21
# @Author : 陈鹏飞
# @Email ： 2578925789@qq.com
# @File : train
# @Description : 

import os

if __name__ == "__main__":
    from ultralytics import YOLO

    # Load a model
    # model = YOLO('yolov8n-p2.yaml').load('yolov8n.pt')
    model = YOLO('yolov8-p2_repvit.yaml')  # build from YAML and transfer weights
    # model = YOLO('/home/chenpengfei/ultralytics/runs/detect/train35/weights/last.pt')

    # Train the model
    model.train(data='driverDetection.yaml', epochs=100, imgsz=[192, 320], batch=96, device=[3], resume=True)

